From 1884225455a18fc51e3d82d234e102583c1084ab Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20H=C3=A4rdeman?= Date: Sun, 27 Jul 2025 22:33:38 +0200 Subject: [PATCH] bind: fix build and bump PKG_RELEASE MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit bind9 builds for me on 24.10, but it doesn't build on master with or without my patches. The build already dies on the configure stage (without my patches applied), because the autoconf magic manages to mix up the host gcc and the cross-compiling gcc. Removing PKG_FIXUP:=autoreconf from the Makefile fixes that, but compilation chokes later instead on libtool magic: make[7]: Entering directory '/home/build/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/bind-9.20.11/bin/rndc' ... /bin/bash ../../libtool --tag=CC --mode=link arm-openwrt-linux-muslgnueabi-gcc ... libtool: link: arm-openwrt-linux-muslgnueabi-gcc ... .../bin/ld.bfd: warning: libns-9.20.11.so, needed by ../../lib/isccfg/.libs/libisccfg.so, not found (try using -rpath or -rpath-link) ... collect2: error: ld returned 1 exit status Which I did a (compile-tested only) quick and dirty fix for. Also, BUILD_CC isn't defined anywhere in the current bind sources, so I removed that as well. Signed-off-by: David Härdeman --- net/bind/Makefile | 23 +++-------------------- 1 file changed, 3 insertions(+), 20 deletions(-) diff --git a/net/bind/Makefile b/net/bind/Makefile index 8db0e335a8..a52d5a7f05 100644 --- a/net/bind/Makefile +++ b/net/bind/Makefile @@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk PKG_NAME:=bind PKG_VERSION:=9.20.11 -PKG_RELEASE:=1 +PKG_RELEASE:=2 USERID:=bind=57:bind=57 PKG_MAINTAINER:=Noah Meyerhans @@ -24,9 +24,6 @@ PKG_SOURCE_URL:= \ https://ftp.isc.org/isc/bind9/$(PKG_VERSION) PKG_HASH:=4da2d532e668bc21e883f6e6d9d3d81794d9ec60b181530385649a56f46ee17a -PKG_FIXUP:=autoreconf -PKG_REMOVE_FILES:=aclocal.m4 libtool.m4 - PKG_INSTALL:=1 PKG_BUILD_FLAGS:=no-mips16 PKG_BUILD_PARALLEL:=1 @@ -148,9 +145,8 @@ define Package/bind-ddns-confgen TITLE+= administration tools (ddns-confgen and tsig-keygen only) endef -export BUILD_CC="$(TARGET_CC)" - -TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed +TARGET_LDFLAGS += -Wl,--gc-sections,--as-needed \ + -Wl,-rpath-link,$(PKG_BUILD_DIR)/lib/ns/.libs CONFIGURE_ARGS += \ --disable-geoip \ @@ -200,19 +196,6 @@ else --without-gssapi endif -CONFIGURE_VARS += \ - BUILD_CC="$(TARGET_CC)" \ - -define Build/Compile - $(MAKE) -C $(PKG_BUILD_DIR)/lib/dns \ - BUILD_CC="$(HOSTCC)" \ - CC="$(HOSTCC)" \ - CFLAGS="-O2" \ - LIBS="" \ - gen - $(call Build/Compile/Default) -endef - define Package/bind-libs/install $(INSTALL_DIR) $(1)/usr/lib $(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so* $(1)/usr/lib -- 2.30.2